<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #box {
            height: 100px;
            width: 100px;
            background-color: pink;
            position: absolute;
            left: 0;
            top: 0;
        }
    </style>
    <script src="utils.js"></script>
</head>
<body>
    <div id="box"></div>
    <script>
       
        document.querySelector('#box').onclick = function () {
            utils.move (this, 'top', window.innerHeight - this.clientHeight, 2000, () =>{
                utils.move (this, 'left', window.innerWidth - this.clientWidth, 4000)
            })
        }
    </script>
</body>
</html>